Setting pointer to the already running Excel file

Hello,

does somebody know how to set pointer to the already running Excel file (instead of open it)? (Several instances of Excel application may run.)

Target: my Excel workbook is already running and I need to Export data from a module usinf dxl.

In vba I would do this:

Sub Test()
Dim xlApp As Excel.Application

Set xlApp = GetObject("C:\test.xlsx").Application
xlApp.Worksheets(2).Select
End Sub

 

How to do this in dxl?


Anta_st - Wed Aug 19 06:32:09 EDT 2015

Re: Setting pointer to the already running Excel file
Mathias Mamsch - Wed Aug 19 06:53:32 EDT 2015

Take a look at the oleGetAutoObject (=GetObject)  function vs. the oleCreateAutoObject (=CreateObject) ... Regards, Mathias
 

Re: Setting pointer to the already running Excel file
Anta_st - Wed Aug 19 07:20:50 EDT 2015

Mathias Mamsch - Wed Aug 19 06:53:32 EDT 2015

Take a look at the oleGetAutoObject (=GetObject)  function vs. the oleCreateAutoObject (=CreateObject) ... Regards, Mathias
 

Perfect! It works! Thanks a lot!! :)